package com.aaa.java09;

/**
 * @author ：Teacher陈（86521760@qq.com）
 * @date ：Created in 2022/7/12 14:39
 * @description：猫 类
 * @modified By：
 * @version: 1.0
 */
public class Cat  extends  MyPet  implements  MyThirdInterface{
    private float weight;

    public Cat() {
    }

    public Cat(String name, int age, String color, float weight) {
        super(name, age, color);
        this.weight = weight;
    }

    public float getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    public void  catchMouse(){
        System.out.println(super.getName()+"抓老鼠");
    }

    @Override
    public void playWithOwner() {
        System.out.println(getName()+"陪我抓毛线");
    }

    @Override
    public void eat() {
        System.out.println("吃鱼");
    }

    @Override
    public void climbTree() {
        System.out.println("爬树");
    }

    @Override
    public void catchFish() {
        System.out.println("抓鱼");
    }



    public static void main(String[] args) {
        Cat cat1 = new Cat();
        MyPet cat2 = new Cat();
        MyInterface cat3 = new Cat();
        cat3.sleep();
        MyThirdInterface cat4 = new Cat();
        cat4.sleep();
        cat4.climbTree();

    }
}
